package com.tduck.cloud.api.web.ao;

import cn.hutool.core.bean.BeanUtil;
import com.tduck.cloud.form.entity.ScoreLevelEntity;
import com.tduck.cloud.form.service.ScoreLevelService;
import com.tduck.cloud.form.vo.ScoreLevelVO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service("scoreLevlAO")
@RequiredArgsConstructor
public class ScoreLevelAO {
    private final ScoreLevelService scoreLevelService;

    public Boolean save(ScoreLevelVO scoreLevel) {
        ScoreLevelEntity scoreLevelEntity = new ScoreLevelEntity();
        BeanUtil.copyProperties(scoreLevel, scoreLevelEntity);
        return scoreLevelService.saveOrUpdate(scoreLevelEntity);
    }
}
